from abc import ABC, abstractmethod

class Component(ABC):
    @abstractmethod
    def sampleOperation(self):
        pass

class ConcreteComponent(Component):
    def sampleOperation(self):
        return "ConcreteComponent's operation"

class Decorator(Component):
    def __init__(self, component: Component):
        self._component = component

    def sampleOperation(self):
        return self._component.sampleOperation()

class ConcreteDecoratorA(Decorator):
    def sampleOperation(self):
        return "ConcreteDecoratorA: " + super().sampleOperation()

class ConcreteDecoratorB(Decorator):
    def sampleOperation(self):
        return "ConcreteDecoratorB: " + super().sampleOperation()

# Usage
component = ConcreteComponent()
decorator_a = ConcreteDecoratorA(component)
decorator_b = ConcreteDecoratorB(decorator_a)
print(decorator_b.sampleOperation())

'''
代码实现：
ConcreteDecoratorB: ConcreteDecoratorA: ConcreteComponent's operation
'''